﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EFCore.Entity;
using EFCore.IDAL;
using Microsoft.Practices.Unity;

namespace EFCore.BLL
{
   public class Base_UserBll:BaseBll<Base_User>
   {
       protected IBase_UserDal dal;

       public Base_UserBll()
       {
           //dal = (IBase_UserDal)Container.Resolve(typeof(IBase_UserDal), "IBase_UserDal", null);
           dal = Container.Resolve<IBase_UserDal>();
       }

       public Base_UserBll(IBase_UserDal dal) : base(dal)
       {
           this.dal = dal;
       }

       public List<Base_User> GetAll()
       {
           var userlist = dal.GetQueryable();
           var users = userlist.ToList<Base_User>();
           return users;
       }
   }
}
